package com.nju.mini_tiktok.bean;

/**
 * 视频video类
 */
public class VideoBean {
    //视频url
    private String url;

    //视频文案
    private String description;

    //是否已点赞
    private boolean isLiked;

    //点赞数
    private int likeCount;

    //封面
    private String coverUrl;

    /**
     * 视频作者
     */
    private UserBean userBean;

    public String getVideoName(){
        return url.substring(28);
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return description == null ? "" : description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    public boolean isLiked() {
        return isLiked;
    }

    public void setLiked(boolean liked) {
        isLiked = liked;
    }

    public int getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(int likeCount){
        this.likeCount = likeCount;
    }

    public String getCoverUrl(){
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl){
        this.coverUrl = coverUrl;
    }

    public static class UserBean {
        //用户名
        private String nickName;
        //用户头像链接
        private String avatar;

        public String getNickName() {
            return nickName == null ? "" : nickName;
        }

        public void setNickName(String nickName) {
            this.nickName = nickName;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }
    }
}
